<template>
  <div>
    <el-cascader v-model="value" v-bind="elProps" :options="options" @change="handleChange" />
  </div>
</template>

<script setup>
import { ref,watch } from "vue";
const props = defineProps({
  elProps: Object,
  modelValue: Array,
  options: Array,
});
const value = ref([]);
watch(()=>props.modelValue,(newval)=>{
value.value = newval
})
value.value = props.modelValue

const emits = defineEmits(['update:modelValue'])
const handleChange = (e)=>{
  emits('update:modelValue', value.value)
}
</script>
<style lang='scss' scoped>
</style>